<?php

namespace app\common\validate;

use think\Validate;

class AboutMe extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     *
     * @var array
     */	
	protected $rule = [
        'name'=>'require|token',
        'email'=>'require|email',
        'subject'=>'require|max:120',
        'message'=>'require',
    ];
    
    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */	
    protected $message = [
        'name.require'=>"姓名不能为空",
        'email.require'=>"邮箱不能为空",
        'email.email'=>"邮箱格式错误",
        'subject.require'=>"标题不能为空",
        'message.require'=>"内容不能为空",
    ];
}
